package setting

import "time"

type ServerSetting struct {
	Name         string
	Port         string
	ReadTimeout  time.Duration
	WriteTimeout time.Duration
}

type LoggerSetting struct {
	SavePath string
	FileName string
	FileExt  string
}

// MeetingManager 会议管理中心配置
type MeetingManager struct {
	Host string
	Port string
	Path string
}

// GetAddr 获取会议管理中心服务器的地址
func (m *MeetingManager) GetAddr() string {
	return m.Host + ":" + m.Port
}

func (s *Setting) ReadSection(k string, v interface{}) error {
	return s.vp.UnmarshalKey(k, v)
}
